Easy to Create, Easy to Change - Easy to use!

Command::

enter a record



Parameters


Returns/Result


Examples


Reference

enter a record

Type

Processing Command

Purpose

The enter a record command adds a record to the specified table.

Syntax

Enter a record in TABLENAME

Usage

The enter a record command must specify a target table and the field values to be entered into the table. Alternatively, you can specify another table from which to copy field data using the copy all from command (see Example 2, below). As data is entered in the table, automatic error checking is performed, including checks for uniqueness, required fields, range checks, etc. Any errors are logged to an exception file.

Example 1

for MEMBERS with TOTAL DUE > 150 ;

enter a record in CATALOG MEMBERS

NAME 1 := MEMBERS FIRST NAME ;

NAME 2 := MEMBERS LAST NAME ;

HOME ADDRESS := MEMBERS ADDRESS ;

HOME CITY := MEMBERS CITY ;

HOME STATE := MEMBERS STATE ;

ZIP CODE := MEMBERS ZIP CODE .

end

 

This script tells DataEase: (1) Select all the MEMBERS records that have an TOTAL DUE greater than $150, and (2) for each MEMBERS record selected, enter a record in the CATALOGMEMBERS table, copying the information from each field in the MEMBERS table to the assigned field in the CATALOG MEMBERS table.

Example 1 simply copies information from the MEMBERS table into the target table. If the source table and target table have identical field names, you can accomplish the same result with the simpler script shown in Example 2.

 

Example 2

for MEMBERS with TOTAL DUE > 150 ;

enter a record in CATALOG MEMBERS

copy all from MEMBERS .

end

See Also


On the forum about enter a record

Syntax of enter a record function

Could someone please explain the construct of the following coding from the CRM application:For Customers with Selected= yes; -- This selection only print the customers that are checked in the list.     For Do...

Product: Dataease [{8}]FIVE. Written by Bill Nicholson 19/11/14 at 07:28:52

Re:Syntax of enter a record function

"The use of the MemoReplace function within the span of the 'enter a record' statement isn't in accordance with the usual syntax however it seems to wor...

Product: Dataease [{8}]FIVE. Written by DataEase 19/11/14 at 17:35:38

Re:Re:Syntax of enter a record function

It seems I got a little ahead of myself there... This is what happens when you write things from the top of your head and don't have the code to work on.There is a SIGNIFICANT difference between Enter A Record and Modify Records and that is wh...

Product: Dataease [{8}]FIVE. Written by DataEase 20/11/14 at 00:18:07

Re:Re:Re:Syntax of enter a record function

I have spent a lot of time on this and cannot make it work. For one final time, the code we now have is:define "retval" text 5 . -- temp variable at head of DQL procedurefor _PrintInterim ;     for...

Product: Dataease [{8}]FIVE. Written by Bill Nicholson 20/11/14 at 10:11:46

Re:Re:Re:Re:Syntax of enter a record function

This is another attempt to change the placeholder text in _GeneratedDocuments with the text held in _PrinterInterim Memo1/2. It follows the construction used in routine DQL0003 in DQLStore of the CRM example. define "retval" text 5 .f...

Product: Dataease [{8}]FIVE. Written by Bill Nicholson 20/11/14 at 14:20:01

Re:Re:Re:Re:Re:Syntax of enter a record function

The MemoMemoCopy() function returns the number of replacements it has done, so that one works.Firstly you don't need the _Dummyform.define "retval" text 5 .for _GeneratedDocuments with DocumentID = TransNo ;for _PrintInterim...

Product: Dataease [{8}]FIVE. Written by DataEase 20/11/14 at 15:39:10

Re:Re:Re:Re:Re:Re:Syntax of enter a record function

I am sorry to keep coming back to the Forum but I simply cannot get the MemoReplace / MemoCopy functions to work no matter how I approach it. I have stripped the whole procedure down to the bare minimum and it now looks like this:-- This pocedu...

Product: Dataease [{8}]FIVE. Written by Bill Nicholson 24/11/14 at 14:24:53

Re:Re:Re:Re:Re:Re:Re:Syntax of enter a record function

Download Sample! Hi again Bill. Your main problem is that you do things very difficult for yourself. 1. DataEase is not C, Basic of Pascal or any su...

Product: Dataease [{8}]FIVE. Written by DataEase 25/11/14 at 13:46:26

Re:Re:Re:Re:Re:Re:Re:Re:Syntax of enter a record function

Well there's a lot of comments in the last post about programming style which aren't contained elsewhere (e.g. the existing DQL manual) and users can be forgiven for simply treating DQL as another language if not told otherwise. I would also point out...

Product: Dataease [{8}]FIVE. Written by Bill Nicholson 26/11/14 at 11:41:56

Re:Re:Re:Re:Re:Re:Re:Re:Re:Syntax of enter a record function

This will be my final post on this topic which has gone on for too long.The MemoReplace and MemoMemoReplace functions appear to be fragile and may need further testing.The desired document can be constructed from a series of MemoCopy sta...

Product: Dataease [{8}]FIVE. Written by Bill Nicholson 26/11/14 at 20:27:21

Re:Syntax of enter a record function

Download Sample! Hi again Bill. Well spotted! There is something wrong with MemoMemoReplace(). It is such a powerful function when it works, but it looks like it...

Product: Dataease [{8}]FIVE. Written by DataEase 26/11/14 at 21:56:35

Re:Re:Syntax of enter a record function

Even in the best of families...You will love this. There has been some harmonization of code, and this has meant that the MemoMemoReplace() function takes Memo as argument for all three arguments... (Only programmers...).This meant tha...

Product: Dataease [{8}]FIVE. Written by DataEase 27/11/14 at 11:29:55

On the blog about enter a record